package com.neusoft.elmboot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.neusoft.elmboot.mapper.PointTransMapper; // 更正为PointTransMapper
import com.neusoft.elmboot.po.PointTrans; // 更正为PointTrans
import com.neusoft.elmboot.service.PointTransService; // 更正为PointTransService
import com.neusoft.elmboot.util.CommonUtil;

@Service
public class PointTransServiceImpl implements PointTransService { // 更正为PointTransServiceImpl和PointTransService
    @Autowired
    private PointTransMapper pointTransMapper; // 更正为PointTransMapper

    @Override
    public List<PointTrans> listPointTransByUserId(String userId) { // 更正为listPointTransByUserId和PointTrans
        return pointTransMapper.listPointTransByUserId(userId); // 更正为listPointTransByUserId
    }

    @Override
    public int savePointTrans(PointTrans pointTrans) { // 更正为savePointTrans和PointTrans
        pointTrans.setTime(CommonUtil.getCurrentDate()); // 假设CommonUtil.getCurrentDate()方法存在
        return pointTransMapper.savePointTrans(pointTrans); // 更正为savePointTrans
    }
}